package stack_queue

func NewMyStack1() *MyStack1 {
	return &MyStack1{doubleLinkList: &DoubleLinkList{}}
}

type MyStack1 struct {
	doubleLinkList *DoubleLinkList
}

func (s *MyStack1) Push(val int) {
	s.doubleLinkList.AddFromHead(val)
}

func (s *MyStack1) Pop() int {
	return s.doubleLinkList.PullFromHead().(int)
}

func (d *MyStack1)IsEmpty() bool {
	return d.doubleLinkList.IsEmpty()
}


